Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 8 - TCP/IP Services / TCP/IP Services Reference
Functions / Resolving Internet Addresses


OTInetAddressToName

Determines the canonical name of the host associated with an
internet address.

C INTERFACE
OSStatus OTInetAddressToName (InetSvcRef ref,
                              InetHost addr,
                              InetDomainName name);
C++ INTERFACE
TInternetServices::AddressToName (InetHost addr,
                                  InetDomainName name);
PARAMETERS
ref
The internet services reference you obtained when you opened the TCP/IP service provider.
addr
The IP address for which you want to determine the associated domain name in either dotted-decimal notation (for example, "12.13.14.15") or hexadecimal notation (for example, "0x0c0d0e0f").
name
A character array you must allocate into which the function places the canonical name.
DESCRIPTION
If you call this function asynchronously, the TCP/IP service provider calls your notifier function with the T_DNRADDRTONAMECOMPLETE completion event code when the function completes. The cookie parameter to the notifier function contains a pointer to the InetHost structure you specified in the addr parameter. If you had more than one simultaneous outstanding call to the OTInetAddressToName function, you can use this information to determine which call has completed execution.

COMPLETION EVENT CODES
T_DNRADDRTONAMECOMPLETE0x10000002The OTInetAddressToName function has completed.
SEE ALSO
Use the OTInetStringToAddress function (page 8-40) to determine the addresses associated with an IP domain name.

You can use the OTInetStringToHost function (page 8-54) to put the address in InetHost format.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996